import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
const login = r => require.ensure([], () => r(require('@/page/login')), 'login');
// const home = r => require.ensure([],()=>r(require('@/page/home')),'home')
const manage = r => require.ensure([], () => r(require('@/page/manage')), 'manage');
const orderList = r => require.ensure([], () => r(require('@/page/orderList')), 'orderList');
const routes = [
	{
		path: '/',
		component: login,
	},
	{
		path: '/manage',
		component: manage,
		name: '',
		children: [
		// {
		// 	path: '/',
		// 	component: home,
		// 	meta: ['首页'],
		// },
		{
			path: '/',
			component: orderList,
			meta: ['用户管理', '用户列表'],
		},	
	]
	}
]

export default new Router({
	routes,
	strict: process.env.NODE_ENV !== 'production',
})
